waxClass{"PowerLichAttack",HNAbstractLogic}
function init(self)
self.super:init()
return self
end


function act (self,a,b,center)
print ('--attack--')
local damage = a.maxdamage
b.tllhp = (b:count()-1)*(b.maxhp) + b.hp
b.tllhp = b.tllhp - damage * a.attack / b.defense 

b:setCount(b.tllhp/b.maxhp)
b.hp = b.tllhp%b.maxhp
center:addObject_forKey(a,'attack')
if b.hp >= 0 then
center:addObject_forKey(b,'beattacked')
center:addObject_forKey(b,'e_Age')
else
center:addObject_forKey(b,'die')
end
print(b.hp)
return 0
end

-- return
-- 0 -- normal
-- 1 -- 2 times attack
